package com.itany.book.service;

import com.github.pagehelper.PageInfo;
import com.itany.exception.RequestParamException;
import com.itany.exception.UserNotExistException;
import com.itany.pojo.User;

/**
 * Auther:ws@itany.com
 * Date:20-10-12 下午3:06
 * Version:1.0
 * Description:
 */

public interface UserService {

    public PageInfo<User> findUserAll(Integer page, Integer rows, String username, String flag);

    /**
     * 查询指定用户
     * @param id    用户id主键
     * @return      用户信息
     * @throws RequestParamException
     * @throws UserNotExistException
     */
    public User findById(String id) throws RequestParamException, UserNotExistException;


    /**
     * 修改指定用户状态
     * @param id        用户id主键
     * @param status    要修改的状态（启用：1, 禁用：2）
     * @throws RequestParamException
     * @throws UserNotExistException
     */
    public void modifyStatus(String id, String status) throws RequestParamException, UserNotExistException;


    /**
     * 修改指定用户信息
     * @param user
     */
    public void modifyUser(User user) throws RequestParamException;
}
